/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.vidmt.api.modules.sys.shiro;

import org.apache.shiro.authc.RememberMeAuthenticationToken;

import com.vidmt.api.modules.sys.Acc;

/**
 * 用户和密码（包含验证码）令牌类
 * 
 * @author ThinkGem
 * @version 2013-5-19
 */
public class MyApiToken implements RememberMeAuthenticationToken {

	private static final long serialVersionUID = 1L;
	private boolean rememberMe = false;
	private Acc acc;
	private String password;
	
	private String os;
	private Integer ver;
	private String channel;

	public MyApiToken() {
	}

	public MyApiToken(Acc acc, String password, boolean rememberMe) {
		this.acc = acc;
		this.password = password;
	}

	@Override
	public Object getPrincipal() {
		return acc;
	}

	@Override
	public Object getCredentials() {
		return password;
	}

	@Override
	public boolean isRememberMe() {
		return rememberMe;
	}

	public String getOs() {
		return os;
	}

	public void setOs(String os) {
		this.os = os;
	}

	public Integer getVer() {
		return ver;
	}

	public void setVer(Integer ver) {
		this.ver = ver;
	}

	public String getChannel() {
		return channel;
	}

	public void setChannel(String channel) {
		this.channel = channel;
	}

}